package com.ec.vs.service;

import com.ec.common.domain.Result;
import com.ec.vs.entity.VsAppointment;
import com.ec.vs.vo.VsAppointmentVo;
import org.springframework.stereotype.Service;

@Service
public interface VsService {

    /**
     * 分页查询预约
     */
    Result<Object> findVisitAppointmentsByPage(int page, int size);

    /**
     * 修改/审核预约
     */
    int updateVisitAppointment(VsAppointment appointment);

    /**
     * 取消预约
     */
    int cancelVisitAppointment(Long id);

    /**
     * 保存用户提交的预约
     */
    int saveVisitAppointment(VsAppointment appointment);

    /**
     * 根据用户 ID 查询预约信息
     */
    VsAppointment findVisitAppointmentByUserId(Long userId);

    boolean checkTimeConflict(VsAppointmentVo appointmentVo);

    boolean checkUserTimeConflict(VsAppointmentVo appointmentVo);

    boolean checkUserDailyLimit(VsAppointmentVo appointmentVo);

    Result<Object> searchVisitAppointments(String name, String mobile, String elderName, String status, int page, int size);

}